﻿var _cfg_domain_root = "u17.com";
var _cfg_domain_static_i = "u17i.com";
var _cfg_domain_static = "u17i.com";
if (location.host.indexOf(".cc") > 0) {
    _cfg_domain_root = "u17.cc";
    _cfg_domain_static = "u17i.u17.cc";
    _cfg_domain_static_i = _cfg_domain_static
} else {
    if (location.host.indexOf(".dev") > 0) {
        _cfg_domain_root = "u17.dev";
        _cfg_domain_static = "u17i.dev";
        _cfg_domain_static_i = _cfg_domain_static
    } else {
        if (location.host.indexOf(".dd") > 0) {
            _cfg_domain_root = "u17.dd";
            _cfg_domain_static = "u17i.dd";
            _cfg_domain_static_i = _cfg_domain_static
        }
    }
}
var _cfg_host_static = "http://static." + _cfg_domain_static;
var _cfg_host_base = "http://www." + _cfg_domain_root;
var _cfg_host_passport = "http://passport." + _cfg_domain_root;
var _cfg_host_i = "http://i." + _cfg_domain_root;
var _cfg_host_upload = "http://upload." + _cfg_domain_root;
var _cfg_host_log = "http://log." + _cfg_domain_root;
var _cfg_host_so = "http://so." + _cfg_domain_root;
var _cfg_host_cover = "http://cover." + _cfg_domain_static;
var _cfg_host_tc = "http://tc." + _cfg_domain_root;
var _cfg_host_shop = "http://shop." + _cfg_domain_root;
var _cfg_host_image = [];
for (i = 0; i < 10; i++) {
    _cfg_host_image[i] = "http://img" + i + "." + _cfg_domain_static
}
var _cfg_host_tuku = "http://tuku." + _cfg_domain_root;
var _cfg_host_pay = "http://pay." + _cfg_domain_root;
var _cfg_host_bbs = "http://bbs." + _cfg_domain_root;
var _cfg_host_static_avatar = "http://avatar." + _cfg_domain_static;
var _cfg_host_static_news = "http://news." + _cfg_domain_static;
var _cfg_host_static_comment = "http://comment." + _cfg_domain_static;
var _cfg_host_static_shop = "http://shop." + _cfg_domain_root;
var _cfg_host_user = "http://user." + _cfg_domain_root;
var _cfg_host_user_comic = "http://old.comic.user." + _cfg_domain_root;
var _cfg_host_user_comic_new = "http://comic.user." + _cfg_domain_root;
var _cfg_host_image_diary = "http://diary." + _cfg_domain_static;
var _cfg_host_image_album = "http://album." + _cfg_domain_static_i;
var _cfg_host_image_tongren = "http://tongren." + _cfg_domain_static;
var _cfg_host_static_i = "http://i." + _cfg_domain_static;
var _cfg_host_comic = "http://comic." + _cfg_domain_root;
var _cfg_host_vip = "http://vip." + _cfg_domain_root;
var _cfg_host_api = "http://api." + _cfg_domain_root;
var _cfg_domain = _cfg_domain_root;
if (_cfg_host_base.indexOf("u17") > 0 && location.host.indexOf("u17") > 0) {
    document.domain = _cfg_domain
}
$(function () {
    $("body").limit();
    if (document.location.host.indexOf(_cfg_domain) > -1) {
        setTimeout(function () {
            update_session()
        }, parseInt(Math.random() * 10) * 1000);
        SessionTimeId = setInterval(function () {
            update_session()
        }, 5 * 55000 + parseInt(Math.random() * 10) * 1000)
    }
    flush_popMsg()
});

function get_notify_count() {
    var a = $.xcookie("notify_count");
    if (a == null) {
        $.ajax({
            type: "GET",
            url: "/passport/ajax.php?mod=notify&act=count",
            cache: false,
            dataType: "json",
            success: function (b) {
                flush_notify_count(b.counts)
            }
        })
    } else {
        flush_notify_count(a)
    }
}
function flush_notify_count(c) {
    c = c.split(":");
    var b = "";
    var a = parseInt(c[0]) - parseInt(c[4]);
    $("#notify_count_all").html(a).toggleClass("fred fb", a > 0);
    if (parseInt(c[1]) > 0) {
        b += '<div id="msg_user"><span class="fred" >' + c[1] + '</span>\u6761\u77ed\u6d88\u606f\uff0c<a href="' + _cfg_host_user + '/message/message_list.php" onclick="check_message(\'msg_user\');"  target="_blank">\u67e5\u770b</a></div>'
    }
    $("#notify_count_user_message").html(c[1]).toggleClass("fred fb", parseInt(c[1]) > 0);
    if (parseInt(c[2]) > 0) {
        b += '<div id="msg_sys"><span class="fred" >' + c[2] + '</span>\u6761\u7cfb\u7edf\u77ed\u6d88\u606f\uff0c<a href="' + _cfg_host_user + '/message/system_message_list.php" onclick="check_message(\'msg_sys\');" target="_blank">\u67e5\u770b</a></div>'
    }
    $("#notify_count_system_message").html(c[2]).toggleClass("fred fb", parseInt(c[2]) > 0);
    if (parseInt(c[3]) > 0) {
        b += '<div id="msg_fensi"><span class="fred">' + c[3] + '</span>\u4f4d\u65b0\u7c89\u4e1d\uff0c<a href="' + _cfg_host_user + '/fans/fans_list.php" onclick="check_message(\'msg_fensi\');" target="_blank">\u67e5\u770b</a></div>'
    }
    $("#notify_count_new_fans").html(c[3]).toggleClass("fred fb", parseInt(c[3]) > 0);
    if (parseInt(c[4]) > 0) {
        b += '<div id="msg_favorite"><span class="fred" >' + c[4] + '</span>\u672c\u6f2b\u753b\u66f4\u65b0\uff0c<a href="' + _cfg_host_user + '/favorite/list.php" onclick="check_message(\'msg_favorite\');" target="_blank">\u67e5\u770b</a></div>';
        $("#notify_count_favorite_comic_v4").html(c[4]).toggleClass("fred fb", parseInt(c[4]) > 0);
        $("#notify_count_favorite_comic").html('<a href="' + _cfg_host_user + '/favorite/list.php" target="_blank">\u6211\u7684\u4e66\u67b6</a>(<strong class="fred">' + c[4] + "</strong>)<span></span>")
    } else {
        $("#notify_count_favorite_comic").html('<a href="' + _cfg_host_user + '/favorite/list.php" target="_blank">\u6211\u7684\u4e66\u67b6</a><span></span>')
    }
    if (parseInt(c[5]) > 0) {
        $("#ticket_num").html(c[5])
    }
    if (parseInt(c[6]) > 0) {
        b += '<div id="msg_author"><span class="fred">' + c[4] + '</span>\u6761\u4f5c\u8005\u77ed\u4fe1\uff0c<a href="' + _cfg_host_user_comic + '/message/message_list.php" onclick="check_message(\'msg_author\')" target="_blank">\u67e5\u770b</a></div>';
        $("#notify_count_author_message").html(c[6]).toggleClass("fred fb", parseInt(c[6]) > 0)
    }
    if (parseInt(c[7]) > 0) {
        b += '<div id="msg_openchapter"><span class="fred">' + c[7] + '</span>\u672c\u6f2b\u753b\u89e3\u7981\uff0c<a href="' + _cfg_host_user + '/favorite/openlist.php" onclick="check_message(\'msg_openchapter\')" target="_blank">\u67e5\u770b</a></div>';
        $("#notify_count_openchapter").html(c[7]).toggleClass("fred fb", parseInt(c[7]) > 0)
    }
    if (/^\u6f2b\u53cb[0-9]+$/.test($("#username").children("a.name").html())) {
        if (b == "") {
            b += '<div id="alter_username"><span class="fred">\u8bf7\u60a8\u8bbe\u7f6e\u4e2a\u6027\u6635\u79f0\uff0c</span><a href="' + _cfg_host_user + '/about/edit_base.php" onclick="check_message(\'alter_username\');" target="_blank">\u4fee\u6539</a></div>'
        } else {
            b += '<div id="alter_username" style="border-top:1px dashed #999999;width:136px;"><span class="fred">\u8bf7\u60a8\u8bbe\u7f6e\u4e2a\u6027\u6635\u79f0\uff0c</span><a href="' + _cfg_host_user + '/about/edit_base.php" onclick="check_message(\'alter_username\');" target="_blank">\u4fee\u6539</a></div>'
        }
    }
    if (b != "") {
        $("#tip_topfixed").show();
        $("#msgview").html(b)
    }
}
function check_message(a) {
    $("#" + a).remove();
    if ($("#msgview div").length == 0) {
        $("#tip_topfixed").hide()
    }
}
function flush_popMsg() {
    var b = $.xcookie("popMsg");
    if (b) {
        $.xcookie("popMsg", null, {
            path: "/",
            domain: "." + _cfg_domain
        });
        var a = b.split(":");
        var c = {};
        if (a[2] != "+0") {
            c["\u5996\u679c"] = a[2]
        }
        if (a[3] != "+0") {
            c["\u7ecf\u9a8c"] = a[3]
        }
        popMsg(c, a[0], a[1])
    }
}
$.fn.xvalidate = function (d) {
    d = jQuery.extend({
        rules: {},
        messages: {},
        submitHandler: function () {
            return true
        },
        success: function () { },
        successClass: "correct",
        errorElement: "div",
        errorClass: "error",
        error: function () { }
    }, d || {});
    var e = {};
    var c = $(this);
    for (var b in d.rules) {
        c.find("[name=" + b + "]").blur(function () {
            e[b] = true;
            a($(this))
        }).keyup(function (g) {
            if (g.which == 9) {
                return
            }
            if (e[b]) {
                var f = $(this);
                timeId = f.data("validate-event");
                if (timeId) {
                    clearTimeout(timeId)
                }
                timeId = setTimeout(function () {
                    a(f)
                }, 500);
                f.data("validate-event", timeId)
            }
        })
    }
    c.submit(function () {
        var g = true;
        for (var f in d.rules) {
            if (!a(c.find("[name=" + f + "]"))) {
                g = false
            }
        }
        if (!g) {
            return false
        }
        return d.submitHandler()
    });

    function a(j) {
        var k = true;
        var h = j.attr("name");
        var g = $("#xvalidate_" + h);
        if (g.length == 0) {
            g = $("<" + d.errorElement + "/>").attr("id", "xvalidate_" + h);
            d.error(g, j)
        }
        for (var f in d.rules[h]) {
            if (f == "remote") {
                if (j.data("remote-value") == j.val()) {
                    k = j.data("remote-success");
                    break
                }
                callback = function () {
                    message = d.messages[h][f];
                    if (typeof message == "function") {
                        message = message.call(this, j.val(), j)
                    }
                    j.data("remote-success", false);
                    g.removeClass(d.successClass).addClass(d.errorClass).html(message)
                };
                j.data("remote-value", j.val());
                j.data("remote-success", true);
                $.xvalidate.method[f](j.val(), j, d.rules[h][f], callback);
                continue
            }
            k = $.xvalidate.method[f](j.val(), j, d.rules[h][f]);
            if (!k) {
                message = d.messages[h][f];
                if (typeof message == "function") {
                    message = message.call(this, d.rules[h][f], j)
                }
                g.removeClass(d.successClass).addClass(d.errorClass).html(message);
                break
            }
        }
        if (k) {
            g.removeClass(d.errorClass).addClass(d.successClass).html("");
            d.success(g)
        }
        return k
    }
};
$.xvalidate = {};
$.xvalidate.method = {
    required: function (c, b, d) {
        b = b.get(0);
        switch (b.nodeName.toLowerCase()) {
            case "select":
                var a = $("option:selected", b);
                return a.length > 0 && (b.type == "select-multiple" || ($.browser.msie && !(a[0].attributes.value.specified) ? a[0].text : a[0].value).length > 0);
            case "input":
                if (/radio|checkbox/i.test(b.type)) {
                    return $(b).filter(":checked").length > 0
                } else {
                    return $.trim(c).length > 0
                }
        }
    },
    rangelength: function (c, a, d) {
        var b = $.trim(c).length;
        return b >= d[0] && b <= d[1]
    },
    username: function (a) {
        return /^[a-zA-Z]+[a-zA-Z0-9_]*$/.est(a)
    },
    remote: function (d, b, e, f) {
        var c = {};
        var a = b.attr("name");
        c[a] = d;
        $.ajax({
            url: e,
            data: c,
            cache: true,
            dataType: "json",
            success: function (g) {
                if (!g) {
                    f()
                }
            }
        });
        return true
    },
    password: function (a) {
        return /^[a-zA-Z0-9_]+$/.test(a)
    },
    nickname: function (a) {
        return /^[\u0391-\uFFE5\w]+$/.test(a)
    },
    ismobile: function (a) {
        return /13[0123456789]{1}\d{8}|15[0123456789]\d{8}|18\d{9}|147\d{8}/.test(a)
    },
    ischeckcode: function (a) {
        return /\d{6}/.test(a)
    },
    byteRangeLength: function (d, b, e) {
        var c = d.length;
        for (var a = 0; a < d.length; a++) {
            if (d.charCodeAt(a) > 127) {
                c++
            }
        }
        return c >= e[0] && c <= e[1]
    },
    email: function (b, a) {
        return /^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$/i.test(b)
    },
    equalTo: function (b, a, c) {
        return b == $(c).val()
    }
};
$.xformat = function (a, b) {
    if (arguments.length == 1) {
        return function () {
            var c = $.makeArray(arguments);
            c.unshift(a);
            return $.xformat.apply(this, c)
        }
    }
    if (arguments.length > 2 && b.constructor != Array) {
        b = $.makeArray(arguments).slice(1)
    }
    if (b.constructor != Array) {
        b = [b]
    }
    $.each(b, function (c, d) {
        a = a.replace(new RegExp("\\{" + c + "\\}", "g"), d)
    });
    return a
};

function login_ajax(e) {
    $("#alert_regist").remove();
    $("#alert_login").remove();
    if ($.xcookie("authkey")) {
        if (typeof e == "function") {
            e()
        } else {
            flush_login()
        }
        return
    } else {
        var a = window.location.href;
        a = encodeURIComponent(a);
        window.location.href = _cfg_host_passport + "/sdo/login.php?url=" + a;
        return
    }
    return;
    var d = $("#alert_login");
    if (d.length == 0) {
        var c = "";
        c += '<div id="alert_login" class="alert_pop">';
        c += '<div class="bg cf">';
        c += '<form id="login_form" onsubmit="post_login_ajax();return false;">';
        c += "<dl>";
        c += '<label for="username">\u8d26 \u6237</label>';
        c += '<input type="text" class="text" onfocus="text_input_focus(this);" onblur="text_input_blur(this);" name="login_username" id="login_username" value="\u90ae\u7bb1/\u624b\u673a/\u7528\u6237\u540d" tabindex="100" maxlength="29">';
        c += "</dl>";
        c += '<dl class="notice cl"><span id="login_username_info">&nbsp;</span></dl>';
        c += "<dl>";
        c += '<label for="password">\u5bc6 \u7801</label>';
        c += '<input type="password" class="text" onfocus="javascript:$(this).addClass(\'current\');" onblur="javascript:$(this).removeClass(\'current\');" name="login_password" id="login_password" tabindex="101" value="" maxlength="27">';
        c += "</dl>";
        c += '<dl class="notice cl"><span id="login_password_info">&nbsp;</span></dl>';
        c += '<dl class="remember">';
        c += '<input type="checkbox" name="login_remember_username" class="check" id="login_remember_username">\u8bb0\u4f4f\u767b\u5f55\u540d';
        c += '<input type="checkbox" name="login_save_login" id="login_save_login" class="check one_month" checked="checked">\u8bb0\u4f4f\u767b\u5f55\u72b6\u6001\u4e00\u4e2a\u6708';
        c += "</dl>";
        c += '<dl class="cf">';
        c += '<input type="submit" class="btn btn_login" value="">';
        c += '<a class="u fblue fl" href="' + _cfg_host_passport + '/member/forgot_begin.php">\u5fd8\u8bb0\u5bc6\u7801\uff1f</a>';
        c += "</dl>";
        c += "</form>";
        c += '<div class="thirdpart">';
        c += '<h4 class="cl fl">\u4f7f\u7528\u5408\u4f5c\u7f51\u7ad9\u8d26\u53f7\u767b\u9646\uff1a</h4>';
        c += '<div class="login_style">';
        c += '<a href="javascript:void(0)" onclick="open_login(_cfg_host_passport+\'/open/open_login.php?site_mark=snda\',580,400,\'\u4f7f\u7528\u76db\u5927\u5e73\u53f0\u767b\u5f55\');" class="shengda">\u76db\u5927\u8d26\u53f7\u767b\u9646 </a>';
        c += '<a href="javascript:void(0)" onclick="open_login(_cfg_host_passport+\'/open/open_login.php?site_mark=sina\',540,400,\'\u4f7f\u7528\u65b0\u6d6a\u5fae\u535a\u767b\u5f55\');" class="sina">\u65b0\u6d6a\u5fae\u535a </a>';
        c += '<a href="javascript:void(0)" onclick="open_login(_cfg_host_passport+\'/open/open_login.php?site_mark=qq\',540,400,\'\u4f7f\u7528QQ\u767b\u5f55\');" class="qq">QQ\u767b\u5f55 </a>';
        c += "</div>";
        c += "</div>";
        c += "</div>";
        c += "</div>";
        $("body").append(c);
        if (typeof (e) == "undefined") {
            $("#alert_login").data("callback", 0)
        } else {
            $("#alert_login").one("backrun", e).data("callback", 1)
        }
        var b = encodeURI(window.location.href);
        $("#alert_login").dialog({
            resizable: false,
            width: 580,
            title: '<span>\u6709\u5996\u6c14\u767b\u5f55<i>\u6211\u4e0d\u662f\u4f1a\u5458&nbsp;<a href="' + _cfg_host_passport + "/member/signup.php?url=" + b + '">\u6ce8\u518c</a></i></span>',
            modal: true,
            open: function () {
                var f = $.xcookie("alllogininfo");
                if (f) {
                    $("#login_username").val(f);
                    $("#login_remember_username").attr("checked", "checked");
                    $("#login_password").focus();
                    $("dl .current").remove("current");
                    $("#login_password").addClass("current")
                } else {
                    $("#login_username").blur()
                }
                if ($("#www_sdo_pop_login").find("iframe").length == 0) {
                    $("#www_sdo_pop_login").html('<iframe  scrolling="no" frameborder="0" src="http://www.sdo.com/LoginFrame.asp?appId=200020500&appArea=0&appDomain=u17.com&CSSURL=http%3A%2F%2Fstatic.u17.com/common/css/sd_tanchu.css&returnURL=' + encodeURIComponent(_cfg_host_passport + "/sdo/sdo_check_index.php?f=" + encodeURIComponent(window.location.href)) + '" height="136" width="210" border="0"></iframe>')
                }
            },
            close: function () { }
        }).dialog("autoHeight")
    } else {
        d.dialog("open")
    }
}
function open_login(b, e, a, f) {
    $("#open,#alert_login,#alert_regist").remove();
    var d = $('<div id="open" style="line-height:0">');
    $("body").append(d);
    var c = '<iframe width="100%" height="100%" scrolling="no" frameborder="0" src="" haslayout="-1" id="commentFrame" ></iframe></div>';
    d.html(c);
    $("#open").dialog({
        width: e,
        height: a,
        modal: true,
        title: f
    }).dialog("open");
    $(window.parent.document).find("#commentFrame").attr("src", b)
}
function post_login_ajax() {
    var b = $.trim($("#login_username").val());
    var a = $("#login_password").val();
    $("#login_username_info").html("&nbsp;");
    $("#login_password_info").html("&nbsp;");
    if (b == "") {
        $("#login_username_info").html("\u767b\u5f55\u8d26\u53f7\u4e0d\u80fd\u4e3a\u7a7a").show();
        return false
    }
    if (a == "") {
        $("#login_password_info").html("\u5bc6\u7801\u4e0d\u80fd\u4e3a\u7a7a").show();
        return false
    }
    $.ajax({
        url: "/passport/ajax.php?mod=member&act=login",
        data: {
            login_username: b,
            login_password: a,
            login_remember_username: $("#login_remember_username").attr("checked") ? "on" : "",
            login_save_login: $("#login_save_login").attr("checked") ? "on" : ""
        },
        dataType: "json",
        type: "POST",
        cache: false,
        success: function (c) {
            if (c.code > 0) {
                flush_popMsg();
                $("#alert_login").dialog("close");
                flush_login();
                if ($("#alert_login").data("callback") == "1") {
                    $("#alert_login").trigger("backrun")
                }
                if (callbackLogin) {
                    for (fun in callbackLogin) {
                        if (typeof (callbackLogin[fun]) == "function") {
                            callbackLogin[fun]()
                        }
                    }
                }
            } else {
                if (c.code == -1 || c.code == -3 || c.code == -4 || c.code == -5) {
                    $("#login_username_info").html(c.message).show()
                } else {
                    if (c.code == -2 || c.code == -6) {
                        $("#login_password_info").html(c.message).show()
                    } else {
                        showMsg(c.message)
                    }
                }
            }
        },
        error: function () {
            showMsg("\u767b\u5f55\u5931\u8d25,\u670d\u52a1\u5668\u901a\u4fe1\u9519\u8bef")
        }
    })
}
function show_checkcode(a) {
    $.ajax({
        url: "/passport/ajax.php?mod=member&act=show_checkcode",
        dataType: "json",
        type: "GET",
        cache: false,
        success: function (b) {
            if (b.code > 0) {
                a()
            }
        }
    })
}
function change_email_mobile_show(a, b) {
    if (b == "undefind") {
        b = 0
    }
    $(".notice").remove();
    if (b == 0) {
        $(a).removeClass();
        $(a).addClass("mailcurrent");
        $(".phonecurrent").addClass("phone");
        $(".phonecurrent").removeClass("phonecurrent");
        $("#email_form").show();
        $("#mobile_form").hide()
    } else {
        if (b == 1) {
            $(a).removeClass();
            $(a).addClass("phonecurrent");
            $(".mailcurrent").addClass("mail");
            $(".mailcurrent").removeClass("mailcurrent");
            $("#email_form").hide();
            $("#mobile_form").show()
        } else {
            $("#" + a).removeClass();
            $("#" + a).addClass("mailcurrent");
            $(".phonecurrent").addClass("phone");
            $(".phonecurrent").removeClass("phonecurrent");
            $("#email_form").show();
            $("#mobile_form").hide()
        }
    }
}
function alert_input_focus(b) {
    $("dt .current").remove("current");
    $(b).addClass("current");
    if (b.value == "") {
        var a = $(b).attr("name") + "_info";
        $("#" + a).show()
    }
}
function alert_input_blur(b) {
    $("dt .current").removeClass("current");
    var a = $(b).attr("name") + "_info";
    $("#" + a).hide()
}
function reg_ajax(d) {
    $("#alert_regist").remove();
    $("#alert_login").remove();
    var a = window.location.href;
    a = encodeURIComponent(a);
    window.location.href = _cfg_host_passport + "/sdo/signup.php?url=" + a;
    return;
    var c = $("#alert_regist");
    if (c.length == 0) {
        var b = "";
        b += '<div class="alert_pop" id="alert_regist" >';
        b += '<div class="bg cf">';
        b += '<div class="tab">';
        b += '<a class="mailcurrent" id="change_email_nav" onfocus="this.blur();" onclick="change_email_mobile_show(this,0);return false;" href="javascript:;"></a>';
        b += '<a class="phone" onfocus="this.blur();" onclick="change_email_mobile_show(this,1);return false;" href="javascript:;"></a>';
        b += "</div>";
        b += '<div style="display:block;" id="email_form">';
        b += '<form id="signup_form">';
        b += "<dl>";
        b += "<dt>";
        b += '<label for="signup_email">\u6211\u7684\u90ae\u7bb1</label>';
        b += '<input type="text" class="text" id="signup_email" name="signup_email" onfocus="alert_input_focus(this);" onblur="alert_input_blur(this);" maxlength="27" />';
        b += "</dt>";
        b += '<dd class="notice2" id="signup_email_info" style="display:none;">\u90ae\u7bb1\u5730\u5740\u4f5c\u4e3a\u767b\u5f55\u540d\uff0c\u540c\u65f6\u4e5f\u7528\u4e8e\u63a5\u6536\u4fe1\u606f\uff0c\u5bc6\u7801\u627e\u56de\u7b49\u529f\u80fd</dd>';
        b += "</dl>";
        b += "<dl>";
        b += "<dt>";
        b += '<label for="signup_password">\u521b\u5efa\u5bc6\u7801</label>';
        b += '<input type="password" class="text" id="signup_password" name="signup_password" onfocus="alert_input_focus(this);" onblur="alert_input_blur(this);" maxlength="16" />';
        b += "</dt>";
        b += '<dd class="notice2" id="signup_password_info" style="display:none;">\u5bc6\u7801\u8bf7\u8bbe\u7f6e\u4e3a5\u523016\u4e2a\u5b57\u7b26\uff0c\u5305\u62ec\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u4e0b\u5212\u7ebf</dd>';
        b += "</dl>";
        b += "<dl>";
        b += "<dt>";
        b += '<label for="signup_nickname">\u6635\u79f0</label>';
        b += '<input type="text" class="text" id="signup_nickname" name="signup_nickname" onfocus="alert_input_focus(this);" onblur="alert_input_blur(this);" maxlength="12" />';
        b += "</dt>";
        b += '<dd class="notice2" id="signup_nickname_info" style="display:none;">\u6635\u79f0\u662f\u60a8\u5728\u6709\u5996\u6c14\u7f51\u7ad9\u7684\u8eab\u4efd\u6807\u8bc6\uff0c\u4e2d\u82f1\u6587\u5747\u53ef\uff0c\u4e0d\u8d85\u8fc76\u4e2a\u6c49\u5b57\u621612\u4e2a\u5b57\u7b26\uff0c\u4e0d\u53ef\u4fee\u6539\u3002</dd>';
        b += "</dl>";
        b += "<dl>";
        b += "<dt>";
        b += '<label for="code">\u9a8c\u8bc1\u7801</label>';
        b += '<input type="text" class="input_code" id="signup_checkcode" name="signup_checkcode" maxlength="6" />';
        b += '<img id="sign_checkcode_image" style="margin: 1px 5px; cursor:pointer;" width="85" height="30" src="' + _cfg_host_passport + '/checkcode.php" onclick="flush_checkcode($(\'#sign_checkcode_image\'))"/>';
        b += '<a href="javascript:;" onclick="flush_checkcode($(\'#sign_checkcode_image\'));return false;" class="fblue u">\u6362\u4e00\u5f20</a>';
        b += "</dt>";
        b += "</dl>";
        b += '<dl class="agreement">';
        b += "<dt>";
        b += '<input type="checkbox" name="signup_agreement" class="check" checked="checked" />';
        b += '<b>\u6211\u5df2\u9605\u8bfb\u5e76\u63a5\u53d7<a href="' + _cfg_host_base + '/z/help/license.html" target="_blank" class="fblue u">\u6709\u5996\u6c14\u4f7f\u7528\u534f\u8bae</a></b>';
        b += "</dt>";
        b += "</dl>";
        b += '<dl style="padding-left:110px;">';
        b += '<input class="btn btn_regist" type="submit" value=""/>';
        b += '<input type="hidden" name="action" value="skip" />';
        b += "</dl>";
        b += "</form>";
        b += "</div>";
        b += '<div style="display:none;" id="mobile_form">';
        b += '<form id="signup_form_mobile">';
        b += "<dl>";
        b += "<dt>";
        b += '<label for="mobile">\u6211\u7684\u624b\u673a\u53f7</label>';
        b += '<input name="mobile" type="text" class="text" id="mobile" onfocus="alert_input_focus(this);" onblur="alert_input_blur(this);" value="" maxlength="11" />';
        b += "</dt>";
        b += '<dd class="fl"><a href="javascript:;" id="get_verification_code" class="get_code" onclick="return false;"><em>\u514d\u8d39\u83b7\u53d6\u9a8c\u8bc1\u7801</em></a></dd>';
        b += '<dd class="notice2" id="mobile_info" style="display:none;">\u8bf7\u586b\u5199\u771f\u5b9e\u7684\u624b\u673a\u53f7\uff0c\u624b\u673a\u53f7\u4f5c\u4e3a\u767b\u5f55\u540d\uff0c\u540c\u65f6\u4e5f\u7528\u4e8e\u5bc6\u7801\u627e\u56de</dd>';
        b += "</dl>";
        b += "<dl>";
        b += "<dt>";
        b += '<label for="mobile_password">\u521b\u5efa\u5bc6\u7801</label>';
        b += '<input class="text fl" name="mobile_password" type="password" id="mobile_password" onfocus="alert_input_focus(this);" onblur="alert_input_blur(this);" maxlength="16" />';
        b += "</dt>";
        b += '<dd class="notice2" id="mobile_password_info" style="display:none;">\u5bc6\u7801\u8bf7\u8bbe\u7f6e\u4e3a5\u523016\u4e2a\u5b57\u7b26\uff0c\u5305\u62ec\u82f1\u6587\u5b57\u6bcd\u3001\u6570\u5b57\u548c\u4e0b\u5212\u7ebf</dd>';
        b += "</dl>";
        b += "<dl>";
        b += "<dt>";
        b += '<label for="mobile_nickname">\u6635\u79f0</label>';
        b += '<input class="text fl" name="mobile_nickname" id="mobile_nickname" type="text" value="" onfocus="alert_input_focus(this);" onblur="alert_input_blur(this);" maxlength="12" />';
        b += "</dt>";
        b += '<dd class="notice2" id="mobile_nickname_info" style="display:none;">\u6635\u79f0\u662f\u60a8\u5728\u6709\u5996\u6c14\u7f51\u7ad9\u7684\u8eab\u4efd\u6807\u8bc6\uff0c\u4e2d\u82f1\u6587\u5747\u53ef\uff0c\u4e0d\u8d85\u8fc76\u4e2a\u6c49\u5b57\u621612\u4e2a\u5b57\u7b26\uff0c\u4e0d\u53ef\u4fee\u6539\u3002</dd>';
        b += "</dl>";
        b += '<dl class="code">';
        b += "<dt>";
        b += "<label>\u624b\u673a\u9a8c\u8bc1\u7801</label>";
        b += '<input name="mobile_checkcode" type="text" class="input_code" id="mobile_checkcode" maxlength="6" />';
        b += '<p class="fl">';
        b += '<span class="send_again">120\u79d2\u5185\u6ca1\u6709\u6536\u5230\u9a8c\u8bc1\u7801\uff0c\u8bf7\u70b9\u51fb\u6b64\u5904<a href="javascript:;" onclick="update_phone_show();return false;" class="fblue u">\u91cd\u53d1&nbsp;</a></span><br />';
        b += '<span>\u5c1d\u8bd5\u591a\u6b21\u4ecd\u6536\u4e0d\u5230\u9a8c\u8bc1\u7801\uff0c\u8bf7\u4f7f\u7528<a href="javascript:;" onclick="change_email_mobile_show(\'change_email_nav\',2);return false;" class="fblue u">\u7535\u5b50\u90ae\u7bb1\u6ce8\u518c&nbsp;</a></span>';
        b += "</p>";
        b += "</dt>";
        b += "</dl>";
        b += '<dl class="agreement">';
        b += "<dt>";
        b += '<input type="checkbox" name="mobile_agreement" id="mobile_agreement" class="check" checked="checked" />';
        b += '<b>\u6211\u5df2\u9605\u8bfb\u5e76\u63a5\u53d7<a href="' + _cfg_host_base + '/z/help/license.html" target="_blank" class="fblue u">\u6709\u5996\u6c14\u4f7f\u7528\u534f\u8bae</a></b>';
        b += "</dt>";
        b += "</dl>";
        b += '<dl class="cf" style="padding-left:110px;">';
        b += '<input class="btn btn_regist" type="submit" value="" />';
        b += '<input type="hidden" name="action" value="skip" />';
        b += "</dl>";
        b += "</form>";
        b += "</div>";
        b += '<div class="thirdpart">';
        b += '<h4 class="cl fl">\u4f7f\u7528\u5408\u4f5c\u7f51\u7ad9\u8d26\u53f7\u767b\u9646\uff1a</h4>';
        b += '<div class="login_style">';
        b += '<a href="javascript:void(0)" onclick="open_login(_cfg_host_passport+\'/open/open_login.php?site_mark=snda\',580,400,\'\u4f7f\u7528\u76db\u5927\u5e73\u53f0\u767b\u5f55\');return false;" class="shengda">\u76db\u5927\u8d26\u53f7\u767b\u9646 </a>';
        b += '<a href="javascript:void(0)" onclick="open_login(_cfg_host_passport+\'/open/open_login.php?site_mark=sina\',540,400,\'\u4f7f\u7528\u65b0\u6d6a\u5fae\u535a\u767b\u5f55\');return false;" class="sina">\u65b0\u6d6a\u5fae\u535a </a>';
        b += '<a href="javascript:void(0)" onclick="open_login(_cfg_host_passport+\'/open/open_login.php?site_mark=qq\',540,400,\'\u4f7f\u7528QQ\u767b\u5f55\');return false;" class="qq">QQ\u767b\u5f55 </a>';
        b += "</div>";
        b += "</div>";
        b += "</div>";
        b += "</div>";
        $("body").append(b);
        if (typeof (d) == "undefined") {
            $("#alert_regist").data("callback", 0)
        } else {
            $("#alert_regist").one("backrun", d).data("callback", 1)
        }
        c = $("#alert_regist").dialog({
            resizable: false,
            width: 580,
            title: '<span>\u6709\u5996\u6c14\u6ce8\u518c<i>\u5df2\u6709\u5996\u6c14\u5e10\u53f7\uff1f&nbsp;<a href="javascript:;" onclick="login_ajax();return false;">\u767b\u5f55</a></i></span>',
            modal: true,
            open: function () {
                $("#checkcode_panel").hide();
                var e = function () {
                    $("#sign_checkcode_image").attr("src", _cfg_host_passport + "/checkcode.php");
                    $("#checkcode_panel").show();
                    flush_checkcode();
                    $("#alert_regist").dialog("autoHeight")
                };
                if ($.xcookie("regflag") == 1) {
                    e()
                }
                show_checkcode(e)
            }
        }).dialog("autoHeight");
        $("#signup_form").xvalidate({
            rules: {
                signup_email: {
                    required: true,
                    email: true,
                    remote: "/passport/ajax.php?mod=member&act=check_email"
                },
                signup_password: {
                    required: true,
                    password: true,
                    rangelength: [5, 16]
                },
                signup_nickname: {
                    required: true,
                    byteRangeLength: [2, 12],
                    nickname: true,
                    remote: "/passport/ajax.php?mod=member&act=check_nickname"
                },
                signup_checkcode: {
                    required: true
                },
                signup_agreement: {
                    required: true
                }
            },
            messages: {
                signup_email: {
                    required: "\u8bf7\u8f93\u5165\u60a8\u7684\u7535\u5b50\u90ae\u7bb1",
                    email: "\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e",
                    remote: $.xformat("{0} \u5df2\u5b58\u5728")
                },
                signup_password: {
                    required: "\u8bf7\u586b\u5199\u5bc6\u7801",
                    rangelength: "\u5bc6\u7801\u957f\u5ea6\u5fc5\u987b\u57285\u523016\u4e4b\u95f4",
                    password: "\u53ea\u80fd\u5305\u62ec\u5b57\u6bcd,\u6570\u5b57\u548c\u4e0b\u5212\u7ebf"
                },
                signup_nickname: {
                    required: "\u6635\u79f0\u4e0d\u80fd\u4e3a\u7a7a",
                    byteRangeLength: "\u6635\u79f0\u9650\u5236\u57286\u4e2a\u6c49\u5b57\u5185",
                    remote: $.xformat("{0} \u5df2\u5b58\u5728"),
                    nickname: "\u53ea\u80fd\u5305\u62ec\u4e2d\u6587,\u5b57\u6bcd,\u6570\u5b57,\u4e0b\u5212\u7ebf"
                },
                signup_checkcode: {
                    required: "\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801"
                },
                signup_agreement: {
                    required: "\u5fc5\u987b\u540c\u610f\u6709\u5996\u6c14\u6ce8\u518c\u534f\u8bae"
                }
            },
            submitHandler: function () {
                post_reg_ajax();
                return false
            },
            success: function (e) { },
            errorElement: "dd",
            errorClass: "notice",
            error: function (e, f) {
                f.parent().after(e)
            }
        });
        $("#signup_form_mobile").xvalidate({
            rules: {
                mobile: {
                    required: true,
                    ismobile: true,
                    remote: "/passport/ajax.php?mod=member&act=check_mobile"
                },
                mobile_password: {
                    required: true,
                    password: true,
                    rangelength: [5, 16]
                },
                mobile_nickname: {
                    required: true,
                    byteRangeLength: [2, 12],
                    nickname: true,
                    remote: "/passport/ajax.php?mod=member&act=check_nickname"
                },
                mobile_checkcode: {
                    required: true,
                    ischeckcode: true
                },
                mobile_agreement: {
                    required: true
                }
            },
            messages: {
                mobile: {
                    required: "\u624b\u673a\u53f7\u7801\u4e0d\u80fd\u4e3a\u7a7a",
                    ismobile: "\u8bf7\u6b63\u786e\u586b\u5199\u60a8\u7684\u624b\u673a\u53f7\u7801",
                    remote: $.xformat("\u624b\u673a\u53f7\u5df2\u5b58\u5728")
                },
                mobile_password: {
                    required: "\u8bf7\u586b\u5199\u5bc6\u7801",
                    rangelength: "\u5bc6\u7801\u957f\u5ea6\u5fc5\u987b\u57285\u523016\u4e4b\u95f4",
                    password: "\u53ea\u80fd\u5305\u62ec\u5b57\u6bcd,\u6570\u5b57\u548c\u4e0b\u5212\u7ebf"
                },
                mobile_nickname: {
                    required: "\u6635\u79f0\u4e0d\u80fd\u4e3a\u7a7a",
                    byteRangeLength: "\u6635\u79f0\u9650\u5236\u57286\u4e2a\u6c49\u5b57\u5185",
                    remote: $.xformat("{0} \u5df2\u5b58\u5728"),
                    nickname: "\u53ea\u80fd\u5305\u62ec\u4e2d\u6587,\u5b57\u6bcd,\u6570\u5b57,\u4e0b\u5212\u7ebf"
                },
                mobile_checkcode: {
                    required: "\u8bf7\u8f93\u5165\u9a8c\u8bc1\u7801",
                    ischeckcode: "\u8bf7\u8f93\u51656\u4f4d\u6570\u5b57\u9a8c\u8bc1\u7801"
                },
                mobile_agreement: {
                    required: "\u5fc5\u987b\u540c\u610f\u6709\u5996\u6c14\u6ce8\u518c\u534f\u8bae"
                }
            },
            submitHandler: function () {
                post_mobile_reg_ajax();
                return false
            },
            success: function (e) { },
            errorElement: "dd",
            errorClass: "notice",
            error: function (e, f) {
                f.parent().after(e)
            }
        });
        $("#get_verification_code").bind("click", function () {
            update_phone_show()
        })
    }
    c.dialog("open")
}
function login_ajax2(a) {
    $("#reg_dialog").dialog("close");
    login_ajax(a);
    $("#login_dialog").dialog("option", "closeOnEscape", false);
    $("#login_dialog").parent().find(".ui-dialog-titlebar-close").hide();
    $(".www_reg_note").remove()
}
function reg_ajax2() {
    var b = $("#reg_dialog");
    if (b.length == 0) {
        var a = '<div id="reg_dialog" title="\u6ce8\u518c" style="display:none"><div class="www_reg_chapters"><div class="www_reg_top">\u9605\u8bfb\u6700\u65b0\u7ae0\u8282\u9700\u8981\u6ce8\u518c</div>';
        a += '<div class="www_reg_middle" style="position:relative;">';
        a += '<form id="signup_form" method="post">';
        a += '<ol><span>\u7535\u5b50\u90ae\u7bb1\uff1a<font class="yellow_ff6600">*</font></span><input type="text" class="input_text_reg" id="signup_email" name="signup_email"/></ol>';
        a += '<ol><span>\u5bc6\u3000\u3000\u7801\uff1a<font class="yellow_ff6600">*</font></span><input type="password" class="input_text_reg" name="signup_password" id="signup_password"/></ol>';
        a += '<ol><span>\u6635\u3000\u3000\u79f0\uff1a<font class="yellow_ff6600">*</font></span><input type="text" class="input_text_reg" name="signup_nickname" id="signup_nickname"/></ol>';
        a += '<ol id="checkcode_panel" style="display:none;"><span>\u9a8c \u8bc1 \u7801\uff1a<font class="yellow_ff6600">*</font></span><input class="input_text_reg" type="text" name="signup_checkcode" id="signup_checkcode" style="width:85px;"><img id="sign_checkcode_image" style="margin: 1px 5px;" onclick="flush_checkcode($(\'#sign_checkcode_image\'))"/><a href="javascript:flush_checkcode($(\'#sign_checkcode_image\'))">\u5237\u65b0</a></ol>';
        a += '<div class="check_text"><input type="checkbox" class="checkbox" name="signup_agreement" id="signup_agreement" checked="checked"/><span class="lf">\u6211\u5df2\u9605\u8bfb\u5e76\u63a5\u53d7<a href="' + _cfg_host_base + '/z/help/license.html" target="_blank">\u6709\u5996\u6c14\u4f7f\u7528\u534f\u8bae</a></span></div>';
        a += '<div class="txt_ct">';
        a += '<input type="submit" class="reg_btn_chapters" value=""  />';
        a += '<input type="hidden" name="action" value="newreg" /></div>';
        a += "</form></div>";
        a += '<div class="www_reg_bottom">\u6211\u5df2\u6ce8\u518c\u6709\u5996\u6c14\u3000\u3000<a class="reg_btn_login" href="javascript:void(0);" onclick="login_ajax2();return false;">\u9a6c\u4e0a\u767b\u9646</a></div>';
        a += "</div></div>";
        $("body").append(a);
        b = $("#reg_dialog").dialog({
            resizable: false,
            width: 500,
            modal: true,
            open: function () {
                $("#checkcode_panel").hide();
                var c = function () {
                    $("#sign_checkcode_image").attr("src", _cfg_host_passport + "/checkcode.php");
                    $("#checkcode_panel").show();
                    flush_checkcode();
                    $("#reg_dialog").dialog("autoHeight")
                };
                if ($.xcookie("regflag") == 1) {
                    c()
                }
                show_checkcode(c)
            },
            draggable: false,
            closeOnEscape: false,
            close: function () {
                $(".www_reg_note").remove()
            }
        });
        $("#signup_form").xvalidate({
            rules: {
                signup_email: {
                    required: true,
                    email: true
                },
                signup_password: {
                    required: true,
                    password: true,
                    rangelength: [5, 16]
                },
                signup_nickname: {
                    required: true,
                    byteRangeLength: [2, 12],
                    nickname: true,
                    remote: "/passport/ajax.php?mod=member&act=check_nickname"
                },
                signup_agreement: {
                    required: true
                }
            },
            messages: {
                signup_email: {
                    required: "\u8bf7\u8f93\u5165\u60a8\u7684\u7535\u5b50\u90ae\u7bb1",
                    email: "\u90ae\u7bb1\u683c\u5f0f\u4e0d\u6b63\u786e"
                },
                signup_password: {
                    required: "\u8bf7\u586b\u5199\u5bc6\u7801",
                    rangelength: "\u5bc6\u7801\u957f\u5ea6\u5fc5\u987b\u57285\u523016\u4e4b\u95f4",
                    password: "\u53ea\u80fd\u5305\u62ec\u5b57\u6bcd,\u6570\u5b57\u548c\u4e0b\u5212\u7ebf"
                },
                signup_nickname: {
                    required: "\u6635\u79f0\u4e0d\u80fd\u4e3a\u7a7a",
                    byteRangeLength: "\u6635\u79f0\u9650\u5236\u57286\u4e2a\u6c49\u5b57\u5185",
                    remote: $.xformat("{0} \u5df2\u5b58\u5728"),
                    nickname: "\u53ea\u80fd\u5305\u62ec\u4e2d\u6587,\u5b57\u6bcd,\u6570\u5b57,\u4e0b\u5212\u7ebf"
                },
                signup_agreement: {
                    required: "\u5fc5\u987b\u540c\u610f\u6709\u5996\u6c14\u6ce8\u518c\u534f\u8bae"
                }
            },
            submitHandler: function () {
                post_reg_ajax();
                return false
            },
            success: function (c) { },
            successClass: "www_reg_note www_reg_check",
            errorElement: "div",
            errorClass: "www_reg_note www_reg_error",
            error: function (c, d) {
                var f = d.offset();
                var e = d.width();
                var h = f.left + e + 15;
                var g = f.top;
                if (d.attr("name") == "signup_agreement") {
                    h = h + 165;
                    g = g - 6
                }
                c.css("zIndex", parseInt($("#reg_dialog").parent().css("zIndex")) + 1);
                c.css("top", g + "px").css("left", h + "px");
                $("body").append(c)
            }
        })
    }
    b.dialog("open");
    $("#reg_dialog").parent().find(".ui-dialog-titlebar-close").hide()
}
function reg_ajax3() {
    var b = $("#reg_dialog");
    var d = window.location.href;
    d = encodeURIComponent(d);
    var c = _cfg_host_passport + "/sdo/login.php?url=" + d;
    if (b.length == 0) {
        var a = '<div id="reg_dialog" title="\u6ce8\u518c\u76db\u5927\u901a\u884c\u8bc1" style="display:none"><div class="www_reg_chapters"><div class="www_reg_top">\u9605\u8bfb\u6700\u65b0\u7ae0\u8282\u9700\u8981\u6ce8\u518c</div>';
        a += '<div class="www_reg_middle" style="position:relative;">';
        a += '<form id="signup_form" method="post">';
        a += '<ol><span>\u4e2a\u6027\u8d26\u53f7\uff1a<font class="yellow_ff6600">*</font></span><input type="text" class="input_text_reg" id="signup_username" name="signup_username"/></ol>';
        a += '<ol><span>\u5bc6\u3000\u3000\u7801\uff1a<font class="yellow_ff6600">*</font></span><input type="password" class="input_text_reg" name="signup_password" id="signup_password"/></ol>';
        a += '<ol id="checkcode_panel" style="display:none;"><span>\u9a8c \u8bc1 \u7801\uff1a<font class="yellow_ff6600">*</font></span><input class="input_text_reg" type="text" name="signup_checkcode" id="signup_checkcode" style="width:85px;"><img id="sign_checkcode_image" style="margin: 1px 5px;" onclick="flush_checkcode($(\'#sign_checkcode_image\'))"/><a href="javascript:flush_checkcode($(\'#sign_checkcode_image\'))">\u5237\u65b0</a></ol>';
        a += '<div class="check_text"><input type="checkbox" class="checkbox" name="signup_agreement" id="signup_agreement" checked="checked"/><span class="lf">\u6211\u5df2\u9605\u8bfb\u5e76\u63a5\u53d7<a href="http://plainreg.sdo.com/public/service_agreements.html" target="_blank">\u76db\u5927\u901a\u884c\u8bc1\u4f7f\u7528\u534f\u8bae</a></span></div>';
        a += '<div class="txt_ct">';
        a += '<input type="submit" class="reg_btn_chapters" value=""  />';
        a += '<input type="hidden" name="action" value="newreg" /></div>';
        a += "</form></div>";
        a += '<div class="www_reg_bottom">\u6211\u5df2\u6ce8\u518c\u76db\u5927\u901a\u884c\u8bc1\u3000\u3000<a class="reg_btn_login" href="' + c + '" return false;">\u9a6c\u4e0a\u767b\u9646</a></div>';
        a += "</div></div>";
        $("body").append(a);
        b = $("#reg_dialog").dialog({
            resizable: false,
            width: 500,
            modal: true,
            open: function () {
                $("#checkcode_panel").hide();
                var e = function () {
                    $("#sign_checkcode_image").attr("src", _cfg_host_passport + "/checkcode.php");
                    $("#checkcode_panel").show();
                    flush_checkcode();
                    $("#reg_dialog").dialog("autoHeight")
                };
                if ($.xcookie("regflag") == 1) {
                    e()
                }
                show_checkcode(e)
            },
            draggable: false,
            closeOnEscape: false,
            close: function () {
                $(".www_reg_note").remove()
            }
        });
        $("#signup_form").xvalidate({
            rules: {
                signup_username: {
                    required: true,
                    username: true,
                    rangelength: [4, 16],
                    remote: "/passport/ajax.php?mod=sdo&act=check_username"
                },
                signup_password: {
                    required: true,
                    password: true,
                    rangelength: [6, 30]
                },
                signup_agreement: {
                    required: true
                }
            },
            messages: {
                signup_username: {
                    required: "\u8bf7\u8f93\u5165\u60a8\u7684\u4e2a\u6027\u8d26\u53f7",
                    rangelength: "\u8d26\u53f7\u957f\u5ea6\u5fc5\u987b\u57284\u523016\u4e4b\u95f4",
                    username: "\u53ea\u5141\u8bb8\u5b57\u6bcd\u548c\u6570\u5b57\uff0c\u5e76\u4e14\u9996\u5b57\u7b26\u5fc5\u987b\u662f\u5b57\u6bcd",
                    remote: $.xformat("{0} \u5df2\u5b58\u5728")
                },
                signup_password: {
                    required: "\u8bf7\u586b\u5199\u5bc6\u7801",
                    rangelength: "\u5bc6\u7801\u957f\u5ea6\u5fc5\u987b\u57286\u523030\u4e4b\u95f4",
                    password: "\u53ea\u80fd\u5305\u62ec\u5b57\u6bcd,\u6570\u5b57\u548c\u4e0b\u5212\u7ebf"
                },
                signup_agreement: {
                    required: "\u5fc5\u987b\u540c\u610f\u6709\u5996\u6c14\u6ce8\u518c\u534f\u8bae"
                }
            },
            submitHandler: function () {
                post_username_reg_ajax();
                return false
            },
            success: function (e) { },
            successClass: "www_reg_note www_reg_check",
            errorElement: "div",
            errorClass: "www_reg_note www_reg_error",
            error: function (e, f) {
                var h = f.offset();
                var g = f.width();
                var k = h.left + g + 15;
                var j = h.top;
                if (f.attr("name") == "signup_agreement") {
                    k = k + 165;
                    j = j - 6
                }
                e.css("zIndex", parseInt($("#reg_dialog").parent().css("zIndex")) + 1);
                e.css("top", j + "px").css("left", k + "px");
                $("body").append(e)
            }
        })
    }
    b.dialog("open");
    $("#reg_dialog").parent().find(".ui-dialog-titlebar-close").hide()
}
function post_username_reg_ajax() {
    var a = $("#signup_form");
    var b = {
        signup_username: a.find("input[name=signup_username]").val(),
        signup_password: a.find("input[name=signup_password]").val(),
        signup_checkcode: a.find("input[name=signup_checkcode]").val(),
        action: a.find("input[name=action]").val()
    };
    $.ajax({
        url: "/passport/ajax.php?mod=sdo&act=snda_regist_comic",
        data: b,
        dataType: "json",
        type: "POST",
        cache: false,
        success: function (c) {
            if (c.code > 0) {
                $("#alert_regist").dialog("close");
                $("#reg_dialog").dialog("close");
                if (c.action == "newreg") {
                    flush_login();
                    popMsg(c.message);
                    return
                }
                popMsg(c.message);
                flush_login();
                if ($("#alert_regist").data("callback") == "1") {
                    $("#alert_regist").trigger("backrun")
                }
            } else {
                showMsg(c.message)
            }
        },
        error: function () {
            showMsg("\u6ce8\u518c\u5931\u8d25,\u670d\u52a1\u5668\u901a\u4fe1\u9519\u8bef")
        }
    })
}
function post_reg_ajax() {
    var a = $("#signup_form");
    var b = {
        signup_email: a.find("input[name=signup_email]").val(),
        signup_nickname: a.find("input[name=signup_nickname]").val(),
        signup_password: a.find("input[name=signup_password]").val(),
        signup_checkcode: a.find("input[name=signup_checkcode]").val(),
        action: a.find("input[name=action]").val()
    };
    $.ajax({
        url: "/passport/ajax.php?mod=member&act=signup&type=email",
        data: b,
        dataType: "json",
        type: "POST",
        cache: false,
        success: function (c) {
            if (c.code > 0) {
                $("#alert_regist").dialog("close");
                $("#reg_dialog").dialog("close");
                if (c.action == "newreg") {
                    flush_login();
                    popMsg(c.message);
                    return
                }
                popMsg(c.message);
                flush_login();
                if ($("#alert_regist").data("callback") == "1") {
                    $("#alert_regist").trigger("backrun")
                }
            } else {
                showMsg(c.message)
            }
        },
        error: function () {
            showMsg("\u6ce8\u518c\u5931\u8d25,\u670d\u52a1\u5668\u901a\u4fe1\u9519\u8bef")
        }
    })
}
function post_mobile_reg_ajax() {
    var a = $("#signup_form_mobile");
    var b = {
        mobile: a.find("input[name=mobile]").val(),
        mobile_password: a.find("input[name=mobile_password]").val(),
        mobile_nickname: a.find("input[name=mobile_nickname]").val(),
        mobile_checkcode: a.find("input[name=mobile_checkcode]").val(),
        action: a.find("input[name=action]").val()
    };
    $.ajax({
        url: "/passport/ajax.php?mod=member&act=signup&type=mobile",
        data: b,
        dataType: "json",
        type: "POST",
        cache: false,
        success: function (c) {
            if (c.code > 0) {
                $("#alert_regist").dialog("close");
                if (c.action == "newreg") {
                    flush_login();
                    new_reg_dialog();
                    return
                }
                popMsg(c.message);
                flush_login();
                if ($("#alert_regist").data("callback") == "1") {
                    $("#alert_regist").trigger("backrun")
                }
            } else {
                showMsg(c.message)
            }
        },
        error: function () {
            showMsg("\u6ce8\u518c\u5931\u8d25,\u670d\u52a1\u5668\u901a\u4fe1\u9519\u8bef")
        }
    })
}
function new_reg_dialog() {
    var a = $("#reg_dialog_2");
    if (a.length == 0) {
        var b = '<div id="reg_dialog_2" title="\u606d\u559c\uff0c\u6ce8\u518c\u6210\u529f"><div class="www_reg_success"><p><img src="' + _cfg_host_static + '/v2/www/images/frame/reg_success.gif"></p><p class="pd_t_15"><a href="' + _cfg_host_user + '/about/edit_base.php" target="_blank"><img src="' + _cfg_host_static + '/v2/www/images/frame/reg_more.gif"></a></p></div></div>';
        $("body").append(b);
        a = $("#reg_dialog_2").dialog({
            resizable: false,
            width: 321,
            height: 175,
            modal: true
        })
    } else {
        a.dialog("open")
    }
}
function flush_checkcode(b) {
    var a = _cfg_host_passport + "/checkcode.php";
    if (b == undefined) {
        b = "#checkcode_image"
    }
    if ($(b).attr("src") != undefined) {
        a = $(b).attr("src") + "?"
    }
    $(b).attr("src", a)
}
function logout_ajax() {
    $.ajax({
        url: "/passport/ajax.php?mod=member&act=logout",
        cache: false,
        dataType: "json",
        success: function (b) {
            if (b.from == "snda") {
                var a = document.createElement("script");
                a.type = "text/javascript";
                a.src = "http://cas.sdo.com/cas/loginStateService?method=checkstat_logout";
                document.getElementsByTagName("head")[0].appendChild(a)
            } else {
                window.location.reload()
            }
        },
        error: function () {
            showMsg("\u767b\u51fa\u5931\u8d25,\u670d\u52a1\u5668\u901a\u4fe1\u9519\u8bef")
        }
    })
}
function checkstat_logout(a) {
    if (a.CAS_LOGIN_STATE == "1") {
        window.location.href = "http://cas.sdo.com/cas/logout?url=" + window.location.href
    } else {
        window.location.reload()
    }
}
function update_session(c) {
    var a = get_user(true);
    if (a != null && a.id > 0) {
        var b = $.xcookie("sessionstatus");
        if (b == undefined || b == null || c === true) {
            $.xcookie("sessionstatus", "2", {
                expires: 25,
                path: "/",
                domain: "." + _cfg_domain
            });
            $.ajax({
                type: "GET",
                url: "/passport/ajax.php?mod=member&act=update_session",
                data: {
                    force: c,
                    title: document.title,
                    url: location.href
                },
                dataType: "json",
                cache: false,
                repeat: false,
                repeatKey: "passport:update_session",
                success: function (d) {
                    if (d.code != -100) {
                        $.xcookie("sessionstatus", "1", {
                            expires: 295,
                            path: "/",
                            domain: "." + _cfg_domain
                        })
                    }
                    if (d.code > 0) { } else {
                        if (d.code == -100) {
                            showMsg(d.message, "\u5996\u6c14\u63d0\u793a", {
                                "\u786e\u5b9a": function () {
                                    window.location.reload();
                                    $(this).dialog("close")
                                }
                            })
                        } else {
                            showMsg(d.message)
                        }
                    }
                },
                error: function () { }
            })
        }
    }
}
var callbackLogin = [];
var MessageTimeId = 0;
var SessionTimeId = 0;

function showMsgS(a) {
    showMsg(a, "\u5996\u6c14\u63d0\u793a", null, 3000)
}
var messageBoxIndex = 0;

function showMsg(q, w, s, f, o, m) {
    var v = f;
    messageBoxIndex++;
    o = typeof (o) == "undefined" ? 350 : o;
    m = typeof (m) == "undefined" ? 220 : m;
    content_height = m - 72;
    var n = "messageBox" + messageBoxIndex;
    $("body").append('<div id="' + n + '" style="display:none;" title=""></div>');
    w = w == undefined ? "\u5996\u6c14\u63d0\u793a" : w;
    $("#" + n).attr("title", w);
    var j = $('<table width="100%" height="' + content_height + '" border="0" cellspacing="0" cellpadding="0"><tr><td class="messageBoxTd" align="center" valign="middle"></td></tr></table>');
    j.find(".messageBoxTd").append(q);
    $("#" + n).append(j);
    var k = function () { };
    var p = null;
    var c = "center";
    if (window.self != window.top) {
        var b = parent.document.documentElement.scrollTop;
        var a = parent.document.documentElement.clientHeight + parent.document.documentElement.scrollTop;
        var d = parent.$("#frame_comment").position().top;
        var h = d + parent.$("#frame_comment").height();
        var l = Math.max(b, d);
        var e = Math.min(a, h);
        var u = (e + l) / 2 - d;
        if (e - l > 220) {
            u -= 110
        }
        var g = parent.$("#frame_comment").width();
        if (g > 350) {
            g = g / 2 - 175
        }
        c = [g, u]
    }
    if (v != undefined && v > 0) {
        k = function (x, y) {
            p = setTimeout(function () {
                $("#" + n).dialog("close")
            }, v)
        }
    }
    if (s == undefined) {
        s = {
            "\u786e\u5b9a": function () {
                $(this).dialog("close")
            }
        }
    }
    var r = $("#" + n).dialog({
        width: o,
        height: m,
        modal: true,
        draggable: true,
        buttons: s,
        resizable: false,
        position: c,
        open: k,
        close: function (y, x) {
            $("#" + n).dialog("destroy").remove();
            clearTimeout(p);
            $().enableSelection()
        }
    });
    r.parent().find("button:contains(\u786e\u5b9a)").addClass("left");
    return r
}
function bind_float_menu(e, c, a, h, g, f) {
    is_relative = true;
    if (a == null || h == null) {
        is_relative = false
    }
    if (typeof g != "function") {
        g = function () { }
    }
    if (typeof f == "undefined") {
        f = "slide"
    }
    $(e).unbind().bind("mouseenter", function () {
        if (is_relative) {
            offset = $(e).offset();
            $(c).css({
                left: offset.left + a,
                top: offset.top + h
            })
        }
        b($(c));
        if ($(e).data("time")) {
            clearTimeout($(e).data("time"))
        }
        if ($(c).data("time")) {
            clearTimeout($(c).data("time"))
        }
    }).dblclick(function () {
        if (is_relative) {
            offset = $(e).offset();
            $(c).css({
                left: offset.left + a,
                top: offset.top + h
            })
        }
        is_show = $(c).is(":hidden");
        if (is_show) {
            d($(c))
        } else {
            b($(c))
        }
    }).bind("mouseleave", function () {
        hidequcikmenu = setTimeout(function () {
            d($(c))
        }, 100);
        $(e).data("time", hidequcikmenu)
    });
    $(c).unbind().bind("mouseleave", function () {
        hidequcikmenu = setTimeout(function () {
            d($(c))
        }, 100);
        $(c).data("time", hidequcikmenu)
    }).bind("mouseenter", function () {
        if ($(e).data("time")) {
            clearTimeout($(e).data("time"))
        }
        if ($(c).data("time")) {
            clearTimeout($(c).data("time"))
        }
    }).find("a").click(function () {
        $(this).blur();
        d($(c))
    });

    function b(j) {
        g($(e), $(c), true);
        if (f == "slide") {
            j.slideDown("fast")
        } else {
            j.show()
        }
    }
    function d(j) {
        g($(e), $(c), false);
        if (f == "slide") {
            j.slideUp("fast")
        } else {
            j.hide()
        }
    }
}
function get_user_face(b, d) {
    if (d == undefined) {
        d = "";
        var c = $.xcookie("authkey");
        if (c != undefined && c != null) {
            auths = c.split("|");
            if (auths.length == 8) {
                d = auths[7]
            }
        }
    }
    var a = "";
    if (d == "default.gif" || d == "" || d == null) {
        a = _cfg_host_static + "/common/images/face/default.gif"
    } else {
        a = _cfg_host_static_avatar + "/" + d
    }
    return add_image_param(a, b)
}
function get_comic_cover(b, a) {
    if (b == "" || b == null) {
        url = _cfg_host_static + "/common/images/show_comic_photo.gif"
    } else {
        url = _cfg_host_cover + "/" + b
    }
    return add_image_param(url, a)
}
function get_comic_image(c, a, b) {
    infos = c.split("/");
    comic_id = infos[infos.length - 2];
    b = comic_id % 10;
    url = _cfg_host_image[b] + "/" + c;
    return add_image_param(url, a)
}
function add_image_param(a, b) {
    extend = a.split(".");
    count = extend.length;
    if (count > 1) {
        extend[count] = extend[count - 1];
        extend[count - 1] = b;
        a = extend.join(".")
    }
    return a
}
function date_format(j, e) {
    var h, g = ((e) ? new Date(e * 1000) : new Date());
    var b = function (f, a) {
        if ((f = f + "").length < a) {
            return new Array(++a - f.length).join("0") + f
        } else {
            return f
        }
    };
    var l = ["Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"];
    var k = {
        1: "st",
        2: "nd",
        3: "rd",
        21: "st",
        22: "nd",
        23: "rd",
        31: "st"
    };
    var c = ["", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
    var d = {
        d: function () {
            return b(d.j(), 2)
        },
        D: function () {
            t = d.l();
            return t.substr(0, 3)
        },
        j: function () {
            return g.getDate()
        },
        l: function () {
            return l[d.w()]
        },
        N: function () {
            return d.w() + 1
        },
        S: function () {
            return k[d.j()] ? k[d.j()] : "th"
        },
        w: function () {
            return g.getDay()
        },
        z: function () {
            return (g - new Date(g.getFullYear() + "/1/1")) / 86400000 >> 0
        },
        W: function () {
            var m = d.z(),
                f = 364 + d.L() - m;
            var n, o = (new Date(g.getFullYear() + "/1/1").getDay() || 7) - 1;
            if (f <= 2 && ((g.getDay() || 7) - 1) <= 2 - f) {
                return 1
            } else {
                if (m <= 2 && o >= 4 && m >= (6 - o)) {
                    n = new Date(g.getFullYear() - 1 + "/12/31");
                    return date("W", Math.round(n.getTime() / 1000))
                } else {
                    return (1 + (o <= 3 ? ((m + o) / 7) : (m - (7 - o)) / 7) >> 0)
                }
            }
        },
        F: function () {
            return c[d.n()]
        },
        m: function () {
            return b(d.n(), 2)
        },
        M: function () {
            t = d.F();
            return t.substr(0, 3)
        },
        n: function () {
            return g.getMonth() + 1
        },
        t: function () {
            var a;
            if ((a = g.getMonth() + 1) == 2) {
                return 28 + d.L()
            } else {
                if (a & 1 && a < 8 || !(a & 1) && a > 7) {
                    return 31
                } else {
                    return 30
                }
            }
        },
        L: function () {
            var a = d.Y();
            return (!(a & 3) && (a % 100 || !(a % 400))) ? 1 : 0
        },
        Y: function () {
            return g.getFullYear()
        },
        y: function () {
            return (g.getFullYear() + "").slice(2)
        },
        a: function () {
            return g.getHours() > 11 ? "pm" : "am"
        },
        A: function () {
            return d.a().toUpperCase()
        },
        B: function () {
            var m = (g.getTimezoneOffset() + 60) * 60;
            var a = (g.getHours() * 3600) + (g.getMinutes() * 60) + g.getSeconds() + m;
            var f = Math.floor(a / 86.4);
            if (f > 1000) {
                f -= 1000
            }
            if (f < 0) {
                f += 1000
            }
            if ((String(f)).length == 1) {
                f = "00" + f
            }
            if ((String(f)).length == 2) {
                f = "0" + f
            }
            return f
        },
        g: function () {
            return g.getHours() % 12 || 12
        },
        G: function () {
            return g.getHours()
        },
        h: function () {
            return b(d.g(), 2)
        },
        H: function () {
            return b(g.getHours(), 2)
        },
        i: function () {
            return b(g.getMinutes(), 2)
        },
        s: function () {
            return b(g.getSeconds(), 2)
        },
        O: function () {
            var a = b(Math.abs(g.getTimezoneOffset() / 60 * 100), 4);
            if (g.getTimezoneOffset() > 0) {
                a = "-" + a
            } else {
                a = "+" + a
            }
            return a
        },
        P: function () {
            var a = d.O();
            return (a.substr(0, 3) + ":" + a.substr(3, 2))
        },
        c: function () {
            return d.Y() + "-" + d.m() + "-" + d.d() + "T" + d.h() + ":" + d.i() + ":" + d.s() + d.P()
        },
        U: function () {
            return Math.round(g.getTime() / 1000)
        }
    };
    return j.replace(/[\\]?([a-zA-Z])/g, function (a, f) {
        if (a != f) {
            ret = f
        } else {
            if (d[f]) {
                ret = d[f]()
            } else {
                ret = f
            }
        }
        return ret
    })
}
function get_user(b) {
    user = $(document).data("loginUser");
    if (user == undefined || user == null || b == true) {
        var a = $.xcookie("authkey");
        if (a == undefined || a == null) {
            return null
        }
        auths = a.split("|");
        if (auths.length != 8) {
            return null
        }
        var c = auths[1];
        if (c == undefined || c == null) {
            return null
        }
        groups = c.split(":");
        if (groups.length != 5) {
            return null
        }
        user = {
            username: auths[3],
            nickname: auths[2],
            id: auths[5],
            face: auths[7],
            group_user: groups[0],
            group_admin: groups[1],
            group_author: groups[2],
            sex: groups[3],
            vip_level: groups[4]
        };
        if (user.id == "deleted") {
            user = null
        }
        $(document).data("loginUser", user)
    }
    return user
}
function in_array(a, c, b) {
    if (!$.isArray(c)) {
        if (c == undefined || c == null) {
            return false
        }
        if (b == undefined) {
            b = ","
        }
        c = c.split(b)
    }
    return $.inArray(a, c) > -1
}
$.xtab = function (k) {
    k = jQuery.extend({
        tab: "",
        body: "",
        event: "click",
        tab_show_class: "selected",
        tab_hide_class: "",
        flag: "tab",
        time: 0,
        effect: "",
        effect_time: 1000,
        default_tab: "1",
        callback: function (x, v, w) { },
        slide_next: null,
        slide_prev: null,
        slide_panel: null,
        is_slide: false,
        slide_width: 0,
        is_lazyload: false,
        lazy_time: 0,
        max_slide: 0
    }, k || {});
    var u = $(k.tab).removeClass(k.tab_show_class);
    var a = $(k.body).hide();
    var f = null;
    var l = null;
    var j;
    var n = null;
    var m = null;
    var e = null;
    var b = 0;
    var c = 0;
    var h;
    if (k.is_slide) {
        if (k.slide_next) {
            n = $(k.slide_next).click(function () {
                g(p());
                q();
                o()
            })
        }
        if (k.slide_prev) {
            m = $(k.slide_prev).click(function () {
                g(s());
                q();
                o()
            })
        }
        e = $(k.slide_panel)
    }
    if (u.length > 0) {
        r()
    }
    function r() {
        u.each(function (v) {
            $(this).attr("tindex", v);
            if ($(this).attr(k.flag) == null) {
                $(this).attr(k.flag, v + 1)
            }
        });
        a.each(function (v) {
            if ($(this).attr(k.flag) == null) {
                $(this).attr(k.flag, v + 1)
            }
        });
        $(k.tab).bind(k.event, function () {
            var w = $(this);
            if (k.lazy_time > 0 && k.event == "mouseover") {
                d();
                var v = function () {
                    g(w);
                    d();
                    return false
                };
                h = setTimeout(v, k.lazy_time)
            } else {
                g($(this));
                q();
                o();
                return false
            }
        });
        if (k.lazy_time > 0 && k.event == "mouseover") {
            $(k.tab).bind("mouseout", function () {
                d()
            })
        }
        l = $(k.tab + "[" + k.flag + "=" + k.default_tab + "]");
        g(l);
        o()
    }
    function d() {
        if (h) {
            clearTimeout(h)
        }
    }
    function o() {
        if (u.length > 1 && k.time > 0) {
            j = setInterval(function () {
                g(p())
            }, k.time)
        }
    }
    function q() {
        if (j) {
            clearInterval(j)
        }
    }
    function s() {
        var v = l.attr(k.flag);
        if ($(u.get(0)).attr(k.flag) == v) {
            return $(u.get(u.length - 1))
        }
        for (var w = 0; w < u.length; w++) {
            if ($(u.get(w)).attr(k.flag) == v) {
                return $(u.get(w - 1))
            }
        }
        return $(u.get(0))
    }
    function p() {
        var v = l.attr(k.flag);
        if ($(u.get(u.length - 1)).attr(k.flag) == v) {
            return $(u.get(0))
        }
        for (var w = 0; w < u.length; w++) {
            if ($(u.get(w)).attr(k.flag) == v) {
                return $(u.get(w + 1))
            }
        }
        return $(u.get(0))
    }
    function g(y) {
        y.trigger("blur");
        var w = y.attr(k.flag);
        u.removeClass(k.tab_show_class);
        u.addClass(k.tab_hide_class);
        y.addClass(k.tab_show_class);
        var A = parseInt(l.attr("tindex"));
        var v = parseInt(y.attr("tindex"));
        l = y;
        if (f) {
            f.hide()
        }
        f = $(k.body + "[" + k.flag + "=" + w + "]").stop(true, true);
        if (k.effect == "fade") {
            f.fadeIn(k.effect_time)
        } else {
            f.show(k.effect, {}, k.effect_time)
        }
        if (k.is_slide) {
            var x = b;
            if (v > A) {
                b = v + 2 - k.max_slide
            } else {
                b = v - 1
            }
            if (v == 0) {
                b = 0
            }
            if (v == u.length - 1) {
                b = u.length - k.max_slide
            }
            if (v == 0 || v == u.length - 1 || v == x || v == x + k.max_slide - 1) {
                e.stop(true, true);
                var z = -b * k.slide_width;
                if (z <= 0) {
                    e.animate({
                        left: z
                    }, 1000)
                }
            }
        }
        if (k.is_lazyload || w > 1) {
            f.find("img").each(function (C, B) {
                if (typeof ($(B).attr("xsrc")) != "undefined") {
                    $(B).attr("src", $(B).attr("xsrc")).removeAttr("xsrc")
                }
            })
        }
        k.callback(y, f, w)
    }
    this.next = function () {
        return p()
    };
    this.prve = function () {
        return s()
    };
    this.active = function (v) {
        g(v)
    };
    return this
};
jQuery.fn.outer = function () {
    return $($("<div></div>").html(this.clone())).html()
};
jQuery.extend({
    unselectContents: function () {
        if (window.getSelection) {
            window.getSelection().removeAllRanges()
        } else {
            if (document.selection) {
                document.selection.empty()
            }
        }
    }
});
jQuery.fn.extend({
    selectContents: function () {
        return $(this).each(function (b) {
            var d = this;
            var c, a, f, e;
            if ((f = d.ownerDocument) && (e = f.defaultView) && typeof e.getSelection != "undefined" && typeof f.createRange != "undefined" && (c = window.getSelection()) && typeof c.removeAllRanges != "undefined") {
                a = f.createRange();
                a.selectNode(d);
                if (b == 0) {
                    c.removeAllRanges()
                }
                c.addRange(a)
            } else {
                if (document.body && typeof document.body.createTextRange != "undefined" && (a = document.body.createTextRange())) {
                    a.moveToElementText(d);
                    a.select()
                }
            }
        })
    },
    setCaret: function () {
        if (!$.browser.msie) {
            return $(this)
        }
        var a = function () {
            var b = $(this).get(0);
            b.caretPos = document.selection.createRange().duplicate()
        };
        return $(this).click(a).select(a).keyup(a)
    },
    insertAtCaret: function (c) {
        var b = $(this).get(0);
        if (document.all && b.createTextRange && b.caretPos) {
            var d = b.caretPos;
            d.text = d.text.charAt(d.text.length - 1) == "" ? c + "" : c
        } else {
            if (b.setSelectionRange) {
                var g = b.selectionStart;
                var f = b.selectionEnd;
                var h = b.value.substring(0, g);
                var e = b.value.substring(f);
                b.value = h + c + e;
                b.focus();
                var a = c.length;
                b.setSelectionRange(g + a, g + a);
                b.blur()
            } else {
                b.value += c
            }
        }
        return this
    }
});

function get_byte_length(c) {
    var b = c.length;
    for (var a = 0; a < c.length; a++) {
        if (c.charCodeAt(a) > 127) {
            b++
        }
    }
    return b
}
function sub_string(h, d, f) {
    if (!h) {
        return h
    }
    h = $.trim(h);
    h = h.replace(/`/g, "");
    var c = /&#[\d]{5};/g;
    var j = h.replace(c, "`");
    var a = 0;
    var k = 0;
    var l = /[\u0080-\uffff]/g;
    var g = "";
    for (var b = 0; b < j.length; b++) {
        var e = j.charAt(b).toString();
        if (e.match(l) != null) {
            a += 2;
            k += 1;
            g += e
        } else {
            if (e == "`") {
                g += h.substring(k, k + 8);
                a += 2;
                k += 8
            } else {
                a++;
                k++;
                g += e
            }
        }
        if (a >= d) {
            break
        }
    }
    if (f && a >= d && g != h) {
        g += ".."
    }
    return g
}
$.fn.limit = function () {
    var b = $(this).find("[limit]");
    for (i = 0; i < b.length; i++) {
        var a = $(b[i]).attr("limit");
        if (a != null) {
            $(b[i]).attr("title", $(b[i]).html());
            $(b[i]).html(sub_string($(b[i]).html(), parseInt(a), true))
        }
    }
};

function str_short_time(b, a, d) {
    var c = (d || 10);
    diff = a - b;
    if (diff < 0) {
        result = ""
    } else {
        if (diff >= 0 && diff < 60) {
            result = diff + "\u79d2\u524d"
        } else {
            if (diff >= 60 && diff < 1800) {
                result = c > 1 ? parseInt(diff / 60) + "\u5206\u949f\u524d" : date_format("m-d H:i", b)
            } else {
                if (diff >= 1800 && diff < 3600) {
                    result = c > 2 ? "\u534a\u5c0f\u65f6\u524d" : date_format("m-d H:i", b)
                } else {
                    if (diff >= 3600 && diff < 86400) {
                        result = c > 3 ? parseInt(diff / 3600) + "\u5c0f\u65f6\u524d" : date_format("m-d H:i", b)
                    } else {
                        if (diff >= 86400 && diff < 604800) {
                            result = c > 4 ? parseInt(diff / 86400) + "\u5929\u524d" : date_format("m-d H:i", b)
                        } else {
                            if (diff >= 604800 && diff < 2592000) {
                                result = c > 5 ? parseInt(diff / 604800) + "\u5468\u524d" : date_format("m-d H:i", b)
                            } else {
                                if (diff >= 2592000 && diff < 31536000) {
                                    result = c > 6 ? parseInt(diff / 2592000) + "\u6708\u524d" : date_format("m-d H:i", b)
                                } else {
                                    if (diff >= 31536000 && diff < 94608000) {
                                        result = c > 7 ? parseInt(diff / 31536000) + "\u5e74\u524d" : date_format("m-d H:i", b)
                                    } else {
                                        result = c > 8 ? "\u5f88\u4e45\u4ee5\u524d" : date_format("m-d H:i", b)
                                    }
                                }
                            }
                        }
                    }
                }
            }
        }
    }
    return result
}
function flashChecker() {
    var hasFlash = 0;
    var flashVersion = 0;
    var isIE = /*@cc_on!@*/
    0;
    if (isIE) {
        try {
            var swf = new ActiveXObject("ShockwaveFlash.ShockwaveFlash");
            if (swf) {
                hasFlash = 1;
                VSwf = swf.GetVariable("$version");
                flashVersion = parseInt(VSwf.split(" ")[1].split(",")[0])
            }
        } catch (e) { }
    } else {
        if (navigator.plugins && navigator.plugins.length > 0) {
            var swf = navigator.plugins["Shockwave Flash"];
            if (swf) {
                hasFlash = 1;
                var words = swf.description.split(" ");
                for (var i = 0; i < words.length; ++i) {
                    if (isNaN(parseInt(words[i]))) {
                        continue
                    }
                    flashVersion = parseInt(words[i])
                }
            }
        }
    }
    return {
        f: hasFlash,
        v: flashVersion
    }
}
function get_user_setting(a) {
    var c = $.xcookie("setting");
    var b = null;
    if (c != null && typeof (c) != "undefined") {
        b = $.evalJSON(c);
        if (typeof (a) != "undefined") {
            return b[a]
        }
    }
    return b
}
function set_user_setting(a, d) {
    var c = $.xcookie("setting");
    var b = null;
    if (c != null && typeof (c) != "undefined") {
        b = $.evalJSON(c);
        b[a] = d
    } else {
        b = {};
        b[a] = d
    }
    $.xcookie("setting", $.toJSON(b), {
        expires: 31536000,
        path: "/",
        domain: "." + _cfg_domain
    })
}
function removejscssfile(a, c) {
    var e = (c == "js") ? "script" : (c == "css") ? "link" : "none";
    var d = (c == "js") ? "src" : (c == "css") ? "href" : "none";
    var f = document.getElementsByTagName(e);
    for (var b = f.length; b >= 0; b--) {
        if (f[b] && f[b].getAttribute(d) != null && f[b].getAttribute(d).indexOf(a) != -1) {
            f[b].parentNode.removeChild(f[b])
        }
    }
}
function createjscssfile(a, b) {
    if (b == "js") {
        var c = document.createElement("script");
        c.setAttribute("type", "text/javascript");
        c.setAttribute("src", a)
    } else {
        if (b == "css") {
            var c = document.createElement("link");
            c.setAttribute("rel", "stylesheet");
            c.setAttribute("type", "text/css");
            c.setAttribute("href", a)
        }
    }
    return c
}
function replacejscssfile(f, h, c) {
    var e = (c == "js") ? "script" : (c == "css") ? "link" : "none";
    var d = (c == "js") ? "src" : (c == "css") ? "href" : "none";
    var g = document.getElementsByTagName(e);
    for (var b = g.length; b >= 0; b--) {
        if (g[b] && g[b].getAttribute(d) != null && g[b].getAttribute(d).indexOf(f) != -1) {
            var a = createjscssfile(h, c);
            g[b].parentNode.replaceChild(a, g[b])
        }
    }
} (function (a) {
    var b = function () { };
    a.extend(b.prototype, {
        yes: "\u786e\u5b9a",
        no: "\u53d6\u6d88",
        title: "\u6d88\u606f\u63d0\u793a\u6846",
        msg: "\u64cd\u4f5c\u9519\u8bef"
    });
    a.confirmDialog = function (e, k) {
        var h = new b();
        a.extend(h, e);
        var g = 0;
        var d = function () {
            g = 1;
            a(this).dialog("close")
        };
        var c = function () {
            g = 0;
            a(this).dialog("close")
        };
        var f = new Object();
        f[h.yes] = d;
        if (h.no != "") {
            f[h.no] = c
        }
        var j = showMsg(h.msg, h.title, f);
        j.one("dialogclose", function () {
            if (g) {
                k()
            }
        });
        if (h.no != "") {
            j.parent().find("button:first").attr("class", "left");
            j.parent().find("button:last").attr("class", "right")
        }
    };
    a.confirmDialog.defaults = function (c) {
        a.extend(b.prototype, c)
    }
})(jQuery);

function popMsg(j, l, c, n) {
    if (typeof l == "undefined") {
        l = ""
    }
    if (typeof c == "undefined") {
        c = ""
    }
    var f = '<div class="exp"><div class="exp_top txt_ct">' + l + '</div><div class="exp_content"><i></i><p>';
    if (typeof (j) == "object") {
        for (var e in j) {
            f += '<font class="red_bc font_14">' + e + '</font><font class="font_18 blue_00 b">' + j[e] + "</font>\u3000"
        }
    } else {
        f += '<font class="red_bc font_14">' + j + "</font>"
    }
    f += "<br />" + c + "</p></div></div>";
    var o = $(f).css("opacity", 0);
    if (n == "window" || typeof n == "undefined") {
        $("body").append(o);
        var m = $(window).scrollTop();
        var h = m + ($(window).height() / 5) * 3;
        var b = m + ($(window).height() / 5) * 2;
        var d = (($(window).width() - o.width()) / 2) + "px"
    } else {
        $(n).append(o);
        var a = height = pleft = ptop = 0;
        var k = {
            w: $(n).width(),
            h: $(n).height(),
            ol: $(n).offset().left,
            ot: $(n).offset().top,
            olw: $(n).offset().left + $(n).width(),
            oth: $(n).offset().top + $(n).height()
        };
        var g = {
            w: $(window).width(),
            h: $(window).height(),
            sL: $(window).scrollLeft(),
            sT: $(window).scrollTop(),
            sLw: $(window).scrollLeft() + $(window).width(),
            sTh: $(window).scrollTop() + $(window).height()
        };
        if (k.ol < g.sL) {
            pleft = g.sL - k.ol;
            if (k.olw > g.sLw) {
                a = g.w
            } else {
                if (k.olw > g.sL) {
                    a = k.olw - g.sL
                }
            }
        } else {
            if (k.olw <= g.sLw) {
                a = k.w
            } else {
                if (k.ol < g.sLw) {
                    a = g.sLw - k.ol
                }
            }
        }
        if (k.ot < g.sT) {
            ptop = g.sT - k.ot;
            if (k.oth > g.sTh) {
                height = g.h
            } else {
                if (k.oth > g.sT) {
                    height = k.oth - g.sT
                }
            }
        } else {
            if (k.oth <= g.sTh) {
                height = k.h
            } else {
                if (k.ot < g.sTh) {
                    height = g.sTh - k.ot
                }
            }
        }
        var h = ptop + (height - o.height()) / 5 * 3;
        var b = ptop + (height - o.height()) / 5 * 2;
        var d = pleft + ((a - o.width()) / 2) + "px"
    }
    o.css("left", d).css("top", h);
    o.animate({
        opacity: 1,
        top: b
    }, 500, null, function () {
        setTimeout(function () {
            o.remove()
        }, 3000)
    })
}
function base64_decode(h) {
    var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    var c, b, a, m, l, k, j, n, g = 0,
        o = 0,
        e = "",
        f = [];
    if (!h) {
        return h
    }
    h += "";
    do {
        m = d.indexOf(h.charAt(g++));
        l = d.indexOf(h.charAt(g++));
        k = d.indexOf(h.charAt(g++));
        j = d.indexOf(h.charAt(g++));
        n = m << 18 | l << 12 | k << 6 | j;
        c = n >> 16 & 255;
        b = n >> 8 & 255;
        a = n & 255;
        if (k == 64) {
            f[o++] = String.fromCharCode(c)
        } else {
            if (j == 64) {
                f[o++] = String.fromCharCode(c, b)
            } else {
                f[o++] = String.fromCharCode(c, b, a)
            }
        }
    } while (g < h.length);
    e = f.join("");
    e = this.utf8_decode(e);
    return e
}
function base64_encode(h) {
    var d = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";
    var c, b, a, m, l, k, j, n, g = 0,
        o = 0,
        f = "",
        e = [];
    if (!h) {
        return h
    }
    h = this.utf8_encode(h + "");
    do {
        c = h.charCodeAt(g++);
        b = h.charCodeAt(g++);
        a = h.charCodeAt(g++);
        n = c << 16 | b << 8 | a;
        m = n >> 18 & 63;
        l = n >> 12 & 63;
        k = n >> 6 & 63;
        j = n & 63;
        e[o++] = d.charAt(m) + d.charAt(l) + d.charAt(k) + d.charAt(j)
    } while (g < h.length);
    f = e.join("");
    switch (h.length % 3) {
        case 1:
            f = f.slice(0, -2) + "==";
            break;
        case 2:
            f = f.slice(0, -1) + "=";
            break
    }
    return f
}
function utf8_decode(a) {
    var c = [],
        e = 0,
        g = 0,
        f = 0,
        d = 0,
        b = 0;
    a += "";
    while (e < a.length) {
        f = a.charCodeAt(e);
        if (f < 128) {
            c[g++] = String.fromCharCode(f);
            e++
        } else {
            if ((f > 191) && (f < 224)) {
                d = a.charCodeAt(e + 1);
                c[g++] = String.fromCharCode(((f & 31) << 6) | (d & 63));
                e += 2
            } else {
                d = a.charCodeAt(e + 1);
                b = a.charCodeAt(e + 2);
                c[g++] = String.fromCharCode(((f & 15) << 12) | ((d & 63) << 6) | (b & 63));
                e += 3
            }
        }
    }
    return c.join("")
}
function utf8_encode(a) {
    var h = (a + "");
    var j = "";
    var b, e;
    var c = 0;
    b = e = 0;
    c = h.length;
    for (var d = 0; d < c; d++) {
        var g = h.charCodeAt(d);
        var f = null;
        if (g < 128) {
            e++
        } else {
            if (g > 127 && g < 2048) {
                f = String.fromCharCode((g >> 6) | 192) + String.fromCharCode((g & 63) | 128)
            } else {
                f = String.fromCharCode((g >> 12) | 224) + String.fromCharCode(((g >> 6) & 63) | 128) + String.fromCharCode((g & 63) | 128)
            }
        }
        if (f !== null) {
            if (e > b) {
                j += h.substring(b, e)
            }
            j += f;
            b = e = d + 1
        }
    }
    if (e > b) {
        j += h.substring(b, h.length)
    }
    return j
}
function htmlspecialchars(c, h, g, b) {
    var e = 0,
        d = 0,
        f = false;
    if (typeof h === "undefined" || h === null) {
        h = 2
    }
    c = c.toString();
    if (b !== false) {
        c = c.replace(/&/g, "&amp;")
    }
    c = c.replace(/</g, "&lt;").replace(/>/g, "&gt;");
    var a = {
        ENT_NOQUOTES: 0,
        ENT_HTML_QUOTE_SINGLE: 1,
        ENT_HTML_QUOTE_DOUBLE: 2,
        ENT_COMPAT: 2,
        ENT_QUOTES: 3,
        ENT_IGNORE: 4
    };
    if (h === 0) {
        f = true
    }
    if (typeof h !== "number") {
        for (d = 0; d < h.length; d++) {
            if (a[h[d]] === 0) {
                f = true
            } else {
                if (a[h[d]]) {
                    e = e | a[h[d]]
                }
            }
        }
        h = e
    }
    if (h & a.ENT_HTML_QUOTE_SINGLE) {
        c = c.replace(/'/g, "&#039;")
    }
    if (!f) {
        c = c.replace(/"/g, "&quot;")
    }
    return c
}
function give_gift_dialog_ajax(b, c) {
    var a = get_user();
    if (!a) {
        login_ajax(function () {
            give_gift_dialog_ajax(b, c)
        });
        return
    }
    $.ajax({
        url: "/user/ajax.php?mod=gift&act=get_dialog",
        type: "POST",
        data: {
            type: b,
            id: c
        },
        success: function (d) {
            $("#give_success").remove();
            if (b == "resend_dialog" || b == "resend_dialogs") {
                $("#resend_dialog").remove();
                $("body").append(d);
                show_dialog_gifts_cate($("#resend_dialog").find(".cate_current"), "all");
                $("#resend_dialog_close").bind("click", function () {
                    $("#resend_dialog").dialog("close")
                });
                if (b == "resend_dialogs") {
                    b = "resend_dialog"
                }
                get_page(b, 1);
                $("#resend_dialog").dialog({
                    width: 586,
                    height: "auto",
                    title: "\u9001\u793c\u7269",
                    resizable: false,
                    modal: true
                }).dialog("open")
            } else {
                if (b == "birthday_gift_dialog") {
                    $("#birthday_gift_dialog").remove();
                    $("body").append(d);
                    show_dialog_gifts_cate($("#birthday_gift_dialog").find(".cate_current"), "all");
                    $("#birthday_gift_dialog").dialog({
                        title: "\u9001\u793c\u7269",
                        width: 586,
                        height: "auto",
                        resizable: false,
                        modal: true
                    }).dialog("open")
                } else {
                    if (b == "thanks_dialog") {
                        $("#thanks_dialog").remove();
                        $("body").append(d);
                        show_dialog_gifts_cate($("#thanks_dialog").find(".cate_current"), "all");
                        $("#thanks_dialog_close").bind("click", function () {
                            $("#thanks_dialog").dialog("close")
                        });
                        $("#thanks_dialog").dialog({
                            width: 566,
                            height: "auto",
                            title: "\u9001\u793c\u7269",
                            resizable: false,
                            modal: true
                        }).dialog("open")
                    } else {
                        if (b == "select_gift_dialog") {
                            $("#select_gift_dialog").remove();
                            $("body").append(d);
                            $("#select_dialog_close").bind("click", function () {
                                $("#select_gift_dialog").dialog("close")
                            });
                            get_page(b, 1);
                            $("#select_gift_dialog").dialog({
                                width: 586,
                                height: "auto",
                                title: "\u9001\u793c\u7269",
                                resizable: false,
                                modal: true
                            }).dialog("open")
                        }
                    }
                }
            }
        },
        error: function () {
            showMsg("\u901a\u4fe1\u9519\u8bef")
        }
    })
}
function get_page(d, c) {
    var e = $("#show_good_user_str_" + d).val();
    if (e != "") {
        var b = e.split(",");
        var h = b.length;
        if (h > (c - 1) * 3) { } else {
            c = 1
        }
        var f = "";
        var a = c * 3;
        var g = a - 4;
        $.each(b, function (k, j) {
            if (k < a && k > g) {
                if (k != g + 1) {
                    f += "\u3001"
                }
                f += '<a href="javascript:void(0);" class="blue" onclick="send_user_gift(\'' + j + "')\">" + j + "</a>"
            }
        });
        c = c + 1;
        if (c > 3) {
            c = 1
        }
        f += "\u6700\u8fd1\u8868\u73b0\u7684\u7070\u5e38\u597d\uff0c\u5feb\u9001\u4e2a\u793c\u7269\u9f13\u52b1\u4ed6\u4eec\u5427\uff01";
        if (h > 3) {
            f += '<a class="blue" href="javascript:void(0);" onclick="get_page(\'' + d + "'," + c + ');">\u6362\u4e00\u7ec4</a>'
        }
        f += '<a href="javascript:void(0);" class="send_gift_close" onclick="$(\'#show_good_user_' + d + "').hide();$('#" + d + "').dialog('autoHeight');\">\u00d7</a>";
        $("#show_good_user_" + d).html(f);
        $("#show_good_user_" + d).show()
    }
}
function send_message(e, d) {
    var b = get_user();
    if (!b) {
        login_ajax(function () {
            send_message(e, d)
        });
        return
    }
    var a = 300;
    var c = '<div id="create_message_dialog" class="bg_white" style="display:none">';
    c += '<div class="mg_2"><div class="width_360 height_23 pd_t_10"><span>\u6635\u79f0\uff1a' + d + "</span></div>";
    c += '<div class="blo height_23 pd_t_4"><span class="red_ee rt"><i id="message_info_count">0</i>/300</span><span>\u53d1\u9001\u5185\u5bb9\uff1a</span></div>';
    c += '<div class="auto zoom"><div class="width_1"><textarea id="message_info" name="message_info" rows="4" class="texteare_1_90 "></textarea></div></div>';
    c += ' <div class="txt_rt pd_t_10 auto zoom"><span class="lf red_e5" id="error_tip"></span><input type="button" id="dialog_submit" class="btn submit" value="\u786e\u5b9a" />&nbsp;<input type="button" id="dialog_reset" class="btn reset" value="\u53d6\u6d88"  /></div></div></div>';
    $("body").append(c);
    $("#create_message_dialog").dialog({
        width: 500,
        height: 240,
        title: "\u53d1\u9001\u77ed\u6d88\u606f",
        modal: true,
        resizable: false,
        close: function () {
            $("#dialog_submit").unbind("click");
            $("#dialog_reset").unbind("click")
        }
    }).dialog("open");
    $("#dialog_reset").bind("click", function () {
        $("#create_message_dialog").dialog("close")
    });
    $("#message_info").bind("keyup", function () {
        var g = $("#message_info").val();
        var f = g.length;
        if (f > a) {
            f = a;
            $("#message_info").val(g.substring(0, a))
        }
        $("#message_info_count").html(a - f)
    });
    $("#dialog_submit").bind("click", function () {
        var f = $.trim($("#message_info").val());
        if (f == "") {
            showMsg("\u5185\u5bb9\u4e0d\u80fd\u4e3a\u7a7a");
            return false
        }
        $.ajax({
            url: "/user/ajax.php?mod=message&act=send_message&type=list",
            data: {
                to_id: e,
                content: f
            },
            type: "POST",
            dataType: "json",
            success: function (g) {
                if (g.code > 0) {
                    popMsg(g.message);
                    $("#create_message_dialog").dialog("close")
                } else {
                    showMsg(g.message)
                }
            }
        })
    })
}
function show_loading() {
    var b = $("#u17_common_loading");
    if (b.length == 0) {
        var a = '<div id="u17_common_loading" style="position:fixed !important;position:absolute;top:0;left:0;height:100%; width:100%; z-index:999; background:#000 url(' + _cfg_host_static + '/common/images/loading2.gif) no-repeat center center; opacity:0.6; filter:alpha(opacity=60);font-size:14px;line-height:20px;" onclick="javascript:hide_loading()">';
        a += '<p id="loading-one" style="color:#fff;position:absolute; top:50%; left:50%; margin:20px 0 0 -50px; padding:3px 10px;" onclick="javascript:hide_loading()">\u6b63\u5728\u8f7d\u5165\u4e2d..</p></div>';
        $("body").append(a)
    }
    b.show()
}
function hide_loading() {
    $("#u17_common_loading").hide()
}
var U17 = {};
U17.add_follow = function (a, c) {
    var b = get_user();
    if (!b) {
        login_ajax(function () {
            add_attention(id)
        });
        return
    }
    $.ajax({
        type: "GET",
        url: "/i/ajax.php?mod=fans&act=add_attention&user_id=" + b.id + "&fans_id=" + a,
        dataType: "json",
        cache: false,
        repeat: false,
        success: function (d) {
            if (d.code > 0) {
                if (typeof c == "function") {
                    c()
                } else {
                    popMsg(d.message)
                }
            } else {
                showMsg(d.message)
            }
        }
    })
};

function check_invite() {
    if (getUrlValue("u") !== null) {
        $.ajax({
            type: "GET",
            url: "/www/ajax.php?mod=bee&act=bee_invite_user&location=" + encodeURIComponent(location.href),
            dataType: "json",
            cache: false,
            success: function (a) { }
        })
    }
}
function getUrlValue(a) {
    var b = new RegExp("(^|&)" + a + "=([^&]*)(&|$)");
    var c = window.location.search.substr(1).match(b);
    if (c != null) {
        return unescape(c[2])
    }
    return null
}
function do_bee_member() {
    if ($.xcookie("fengchao") !== null) {
        $.ajax({
            type: "GET",
            url: "/www/ajax.php?mod=bee&act=bee_invite_user",
            dataType: "json",
            cache: false,
            success: function (a) { }
        })
    }
};